package com.ldg.user.client;

import com.ld.pojo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: Liudao
 * @Date: 2022-10-09-16:39
 * @Description:
 */
//参数是被调用的微服务,还有调用失败的回调策略，还有一种是【fallbackFactory】
@FeignClient(value = "ldg-manager",fallback = MyFallBackImpl.class)
@Component
public interface ManagerClient {

    //查询所有品牌列表
    @GetMapping("/brand/findAll")
    R findAll();

    //根据id查询品牌对象
    @GetMapping("/brand/info/{id}")
    R info(@PathVariable("id") String id);
}
